<template>
  <div>
    <p v-for="(item,index) in crr" :key="index">{{item}}</p>
    <button @click="add">数组里的值乘以2</button>
  </div>
</template>

<script>
export default {
  data () {
    return {
      brr : [1, 0, 2, 0, 0, 0, 5],
      crr : []
    }
  },
  methods: {
    add(){
      this.brr.forEach(item=>{
        let items=item*item
        this.crr.push(items)
        }
        )
    }
  }

}
</script>

<style>

</style>